package cn.edu.scau.cmi.liangzijian.simpleFactoryMethod;

import cn.edu.scau.cmi.liangzijian.simpleFactoryMethod.meat.Beef;
import cn.edu.scau.cmi.liangzijian.simpleFactoryMethod.meat.Chicken;
import cn.edu.scau.cmi.liangzijian.simpleFactoryMethod.meat.Meat;
import cn.edu.scau.cmi.liangzijian.simpleFactoryMethod.meat.Pork;

public class MeatFactory {
	public static Meat getMeat(String meatTypeString) {
		Meat meat = null;
		
		switch(meatTypeString) {
		case "beef":
			meat = new Beef();
			break;
		case "pork":
			meat = new Pork();
			break;
		case "chicken":
			meat = new Chicken();	
		}
		
		return meat;
	}
}
